package pl.mdziedzic.pagetests;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

public class LoginPage extends Page{

	public LoginPage(WebDriver driver) {
		super(driver);
	}
	
	public void open(){
		driver.get(this.baseUrl+"/session/new");
	}
	
	public HomePage login(String login, String pass){
		insertText(By.id("login"), login);
		insertText(By.id("password"), pass);
		clickElement(By.name("commit"));
		return new HomePage(driver);
	}

}
